package strategy;

public class CashFactory {
    public static CashStrategy createCashAccess(int type) {
        CashStrategy cs = null;
        switch(type) {
            case 1:
                cs = new CashNormal();
                break;
            case 2:
                cs = new CashRebate(0.8d);
                break;
            case 3:
                cs = new CashRebate(0.7d);
                break;
            case 4:
                cs = new CashReturn(300d, 100d);
                break;
        }
        return cs;
    }
}
